﻿@using Xfm.TagHelpers.Enums
@{
    ViewData["Title"] = "General";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <h5 class="mt-4 mb-2">Card自定义标签，Theme颜色展示,默认Theme为Primary</h5>
        </div>
    </div>

    <div class="row">
        @foreach (var item in Html.GetEnumSelectList<ThemeColor>())
        {
            <div class="col-md-4">
                <card theme="@((ThemeColor)int.Parse(item.Value))" title="自定义的card标签">
                    <code>@($"<card theme=\"{item.Text}\" title=\"标题\">内容</card>")</code>
                </card>
            </div>
        }


    </div>
    <h5 class="mt-4 mb-2">Card其他内容</h5>
    <div class="row">
        <div class="col-md-6">
            <card theme="Success" title="自带的所有Tools" tools="refresh,maximize,collapse,remove" refresh-id="r1" refresh-url="/htmlpage.html">
            </card>
        </div>
        <div class="col-md-6">
            <card out-line="true" title="边框outline">
                <code>@($"<card  out-line=\"true\" title=\"标题\">内容</card>")</code>
            </card>
        </div>
        <div class="col-md-6">
            <card theme="Warning" icon="fas fa-edit" title="标题图标Iocn">
                <code>@($"<card theme=\"Warning\" icon=\"fas fa-edit\"  title=\"标题\">内容</card>")</code>
            </card>
        </div>

        <div class="col-md-6">
            <card title="可折叠的Card" tools="collapse">
                可折叠的Card
            </card>
        </div>
    </div>
</div>
@section Scripts{
    <script>
        $(function () {
            //异步加载内容
            $('#r1').CardRefresh('load');//或者 $('#t1').CardRefresh('toggle')
        })

    </script>
}
